package hsp.admin.app.development.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import hsp.admin.api.ApiResult;
import hsp.admin.app.development.po.DevelopmentDemoPO;
import hsp.admin.app.development.service.IDevelopmentDemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("development/demo")
public class DevelopmentDemoController {

    private final IDevelopmentDemoService developmentDemoService;

    @Autowired
    public DevelopmentDemoController(
        IDevelopmentDemoService developmentDemoService
    ){
        this.developmentDemoService = developmentDemoService;
    }

    @GetMapping("list")
    public ApiResult<List<DevelopmentDemoPO>> getAppList(){
        LambdaQueryWrapper<DevelopmentDemoPO> wrapper = new LambdaQueryWrapper<>();
        List<DevelopmentDemoPO> list = developmentDemoService.list(wrapper);
        return ApiResult.success(list);
    }

}
